<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用公共文件

/**
 * 使用MD5盐值加密
 * @param  string $string 待加密字符串
 * @param  string $salt   盐值，4位长度
 * @return string         加密后字符串
 */
function my_md5($string, $salt) {
	return md5(substr($salt, 0, 2) . $string . substr($salt, 2, 2));
}
